<!DOCTYPE html>
<html lang="zh-CN">
@include('admin.header')
<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-row">
            <div class="layui-card" >
                <div class="layui-card-header">表单</div>
                <form class="layui-form layui-card-body" action="{{route('useradd')}}" method="post">
                    {{csrf_field()}}
                  <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-inline">
                      <input type="text" name="name" required  lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-inline">
                      <input type="text" name="email" required  lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">该邮箱为登录账户</div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">密码框</label>
                    <div class="layui-input-inline">
                      <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn layui-btn-blue" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                  </div>
                    <div class="layui-form-item">
                        @if(!empty($errors))
                            <ul>
                                @foreach($errors->all() as $v)
                                    <li style="list-style-type: disc;list-style-position: inside;color: red;">{{$v}}</li>
                                @endforeach
                            </ul>
                        @endif
                    </div>
                </form>  
            </div>
        </div>
    </div>
    <script src="style/assets/layui.all.js"></script>
    <script>
      var form = layui.form
        ,layer = layui.layer;
    </script>
</body>
</html>